<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
		xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
<xsl:template match="plan.xsl">


<fo:root xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<fo:layout-master-set>
		<fo:simple-page-master master-name="default-page" page-height="11.69in" page-width="8.27in" margin-left="14mm" margin-right="9mm" margin-top="6mm" margin-bottom="6mm">
			<fo:region-after extent="10cm"/>
			<fo:region-body margin-top="0.05in" margin-bottom="0.05in"/>
		</fo:simple-page-master>
	</fo:layout-master-set>

	<fo:page-sequence master-reference="default-page" initial-page-number="1" format="1">

<!-- FOOTER -->
		<fo:static-content flow-name="xsl-region-after">
			<fo:block>

				<fo:table space-before="1mm" width="100%" font-size="small" table-layout="fixed" >
					<fo:table-column column-width="proportional-column-width(1)"/>
					<fo:table-column column-width="proportional-column-width(1)"/>
					<fo:table-column column-width="proportional-column-width(1)"/>
					
					<fo:table-body start-indent="0pt">
						<fo:table-row height="10mm">
							<fo:table-cell display-align="center">
								<fo:block>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell display-align="center" >
								<fo:block>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell display-align="center" padding-left="4mm" padding-right="4mm" border-color="black" border-width="1pt" border-after-style="solid">
								<fo:block font-size="7pt" font-weight="normal" >
									<xsl:apply-templates select="signature"/>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
						<fo:table-row height="4mm">
							<fo:table-cell display-align="center" text-align="center">
								<fo:block></fo:block>
							</fo:table-cell>
							<fo:table-cell display-align="center" >
								<fo:block>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell display-align="center" text-align="center" >
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
									<fo:inline>
										Administrador.
									</fo:inline>
								</fo:block>
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
									<fo:inline>
										Buildadmin S.A.
									</fo:inline>
								</fo:block>
								
							</fo:table-cell>
						</fo:table-row>
					</fo:table-body>
				</fo:table>

			</fo:block>

		</fo:static-content>

		<fo:flow flow-name="xsl-region-body">
			<fo:block>

<!-- CONSTANCIA DE LIQUIDACION DE EXPENSAS -->

				<fo:table space-before="1mm" width="100%" font-size="small" table-layout="fixed" >
					<fo:table-column column-width="proportional-column-width(100)"/>
					<fo:table-body start-indent="0pt">					
						<fo:table-row height="10mm">
							<fo:table-cell display-align="center" text-align="center">
								<fo:block padding-bottom="5mm" font-size="14pt" font-family="sans-serif">
									<fo:inline font-weight="bold" text-decoration="underline">CONSTANCIA DE PLAN DE PAGO</fo:inline>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
						<fo:table-row>
							<fo:table-cell padding="0" display-align="center">
								<fo:block>
									<fo:table width="100%" font-size="small" table-layout="fixed" >
										<fo:table-column column-width="proportional-column-width(65)"/>
										<fo:table-column column-width="proportional-column-width(35)"/>
										<fo:table-body start-indent="0pt">
											<fo:table-row height="4mm">
												<fo:table-cell padding-right="1mm" text-align="right" display-align="center">
													<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
														<fo:inline>Responsable:</fo:inline>
													</fo:block>
												</fo:table-cell>
												<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
													<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif" font-weight="bold">
														<xsl:value-of select="plan/responsable"/>
													</fo:block>
												</fo:table-cell>
											</fo:table-row>
										</fo:table-body>
									</fo:table>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
						<fo:table-row height="10mm">
						</fo:table-row>
					</fo:table-body>
				</fo:table>


<!-- Detalle del plan -->

				<fo:table space-before="1mm" width="100%" font-size="small" table-layout="fixed" >
					<fo:table-column column-width="proportional-column-width(1)"/>
								
					<fo:table-body start-indent="0pt">
						<fo:table-row height="3mm">
							<fo:table-cell display-align="center" background-color="#C0C0C0" padding-left="1mm">
								<fo:block padding-top="0.5mm" font-size="8pt" font-family="sans-serif">
									<fo:inline font-weight="bold">Detalle del Plan</fo:inline>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
					</fo:table-body>
				</fo:table>

				<fo:table space-before="1mm" width="100%" font-size="small" table-layout="fixed" >
					<fo:table-column column-width="proportional-column-width(13)"/>
					<fo:table-column column-width="proportional-column-width(10)"/>
					<fo:table-column column-width="proportional-column-width(8)"/>
					<fo:table-column column-width="proportional-column-width(5)"/>
					<fo:table-column column-width="proportional-column-width(10)"/>
					<fo:table-column column-width="proportional-column-width(54)"/>
					<fo:table-body start-indent="0pt">
						<fo:table-row height="4mm">
							<fo:table-cell display-align="center">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
									<fo:inline>Monto:</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif" font-weight="bold">
									<xsl:value-of select="plan/monto"/>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell display-align="center">
								<fo:block></fo:block>
							</fo:table-cell>
							<fo:table-cell display-align="center">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
									<fo:inline>Cuotas:</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif" font-weight="bold">
									<xsl:value-of select="plan/cuotas"/>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell display-align="center">
								<fo:block></fo:block>
							</fo:table-cell>
						</fo:table-row>
					</fo:table-body>
				</fo:table>

				<fo:table space-before="1mm" width="100%" font-size="small" table-layout="fixed" >
					<fo:table-column column-width="proportional-column-width(23)"/>
					<fo:table-column column-width="proportional-column-width(15)"/>
					<fo:table-column column-width="proportional-column-width(62)"/>
					<fo:table-body start-indent="0pt">
						<fo:table-row height="4mm">
							<fo:table-cell display-align="center">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
									<fo:inline>Saldo del Plan:</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif" font-weight="bold">
									<xsl:value-of select="plan/saldoPlan"/>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell display-align="center">
								<fo:block></fo:block>
							</fo:table-cell>
						</fo:table-row>
					</fo:table-body>
				</fo:table>

				<fo:table space-before="1mm" width="100%" font-size="small" table-layout="fixed" >
					<fo:table-column column-width="proportional-column-width(23)"/>
					<fo:table-column column-width="proportional-column-width(15)"/>
					<fo:table-column column-width="proportional-column-width(62)"/>
					<fo:table-body start-indent="0pt">
						<fo:table-row height="4mm">
							<fo:table-cell display-align="center">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
									<fo:inline>Saldo de Intereses:</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif" font-weight="bold">
									<xsl:value-of select="plan/saldoIntereses"/>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell display-align="center">
								<fo:block></fo:block>
							</fo:table-cell>
						</fo:table-row>
					</fo:table-body>
				</fo:table>

<!-- Liquidaciones -->

				<fo:table space-before="1mm" width="100%" font-size="small" table-layout="fixed" >
					<fo:table-column column-width="proportional-column-width(1)"/>
								
					<fo:table-body start-indent="0pt">
						<fo:table-row height="3mm">
							<fo:table-cell display-align="center" background-color="#C0C0C0" padding-left="1mm">
								<fo:block padding-top="0.5mm" font-size="8pt" font-family="sans-serif">
									<fo:inline font-weight="bold">Liquidaciones</fo:inline>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
					</fo:table-body>
				</fo:table>

				<fo:table space-before="1mm" width="100%" font-size="small" table-layout="fixed" >
<!-- numero -->		<fo:table-column column-width="proportional-column-width(10)"/>
<!-- periodo -->	<fo:table-column column-width="proportional-column-width(15)"/>
<!-- monto -->		<fo:table-column column-width="proportional-column-width(15)"/>
<!-- intereses -->	<fo:table-column column-width="proportional-column-width(15)"/>
<!-- punitorio -->	<fo:table-column column-width="proportional-column-width(15)"/>
<!-- int2venc -->	<fo:table-column column-width="proportional-column-width(15)"/>
<!-- venc -->		<fo:table-column column-width="proportional-column-width(15)"/>

					<fo:table-header start-indent="0pt">
						<fo:table-row height="4mm">
							<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
									<fo:inline>Número</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
									<fo:inline>Periodo</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
									<fo:inline>Monto</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
									<fo:inline>Intereses</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
									<fo:inline>Punitorio</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
									<fo:inline>Int 2do Venc</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
									<fo:inline>Vencimiento</fo:inline>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
					</fo:table-header>

					<fo:table-body start-indent="0pt">
						<xsl:for-each select="liquidacion">
							<fo:table-row height="4mm">
								<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
									<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif" font-weight="bold">
										<xsl:value-of select="numero"/>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
									<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif" font-weight="bold">
										<xsl:value-of select="periodo"/>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
									<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif" font-weight="bold">
										<xsl:value-of select="monto"/>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
									<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif" font-weight="bold">
										<xsl:value-of select="intereses"/>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
									<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif" font-weight="bold">
										<xsl:value-of select="punitorio"/>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
									<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif" font-weight="bold">
										<xsl:value-of select="int2venc"/>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
									<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif" font-weight="bold">
										<xsl:value-of select="vencimiento"/>
									</fo:block>
								</fo:table-cell>
							</fo:table-row>
						</xsl:for-each>
					</fo:table-body>
				</fo:table>

<!-- Cobros -->

				<fo:table space-before="1mm" width="100%" font-size="small" table-layout="fixed" >
					<fo:table-column column-width="proportional-column-width(1)"/>
								
					<fo:table-body start-indent="0pt">
						<fo:table-row height="3mm">
							<fo:table-cell display-align="center" background-color="#C0C0C0" padding-left="1mm">
								<fo:block padding-top="0.5mm" font-size="8pt" font-family="sans-serif">
									<fo:inline font-weight="bold">Cobros</fo:inline>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
					</fo:table-body>
				</fo:table>

				<fo:table space-before="1mm" width="100%" font-size="small" table-layout="fixed" >
<!-- numero -->		<fo:table-column column-width="proportional-column-width(25)"/>
<!-- fecha -->		<fo:table-column column-width="proportional-column-width(25)"/>
<!-- monto -->		<fo:table-column column-width="proportional-column-width(25)"/>
<!-- intereses -->	<fo:table-column column-width="proportional-column-width(25)"/>

					<fo:table-header start-indent="0pt">
						<fo:table-row height="4mm">
							<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
									<fo:inline>Número</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
									<fo:inline>Fecha</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
									<fo:inline>Monto</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
									<fo:inline>Intereses</fo:inline>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
					</fo:table-header>

					<fo:table-body start-indent="0pt">
						<xsl:for-each select="cobro">
							<fo:table-row height="4mm">
								<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
									<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif" font-weight="bold">
										<xsl:value-of select="numero"/>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
									<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif" font-weight="bold">
										<xsl:value-of select="fecha"/>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
									<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif" font-weight="bold">
										<xsl:value-of select="monto"/>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
									<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif" font-weight="bold">
										<xsl:value-of select="intereses"/>
									</fo:block>
								</fo:table-cell>
							</fo:table-row>
						</xsl:for-each>
					</fo:table-body>
				</fo:table>


			</fo:block>
			<fo:block id="theEnd"/>
		</fo:flow>


	</fo:page-sequence>
</fo:root>

</xsl:template>

<xsl:template match="logo">
	<fo:block font-size="7pt" font-weight="normal" width="15mm">
		<fo:external-graphic src="{.}"/>
	</fo:block>
</xsl:template>

<xsl:template match="imgCompania">
	<fo:block font-size="7pt" font-weight="normal" width="15mm">
		<fo:external-graphic src="{.}"/>
	</fo:block>
</xsl:template>

<xsl:template match="signature">
	<fo:block font-size="7pt" font-weight="normal" width="15mm">
		<fo:external-graphic src="{.}"/>
	</fo:block>
</xsl:template>

</xsl:stylesheet>